﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class _Default : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected override void Page_LoadOnce()
    {
        base.Page_LoadOnce();
        //lt_Exams.Text = getList();
    }

    private string getList()
    {
        string liText = string.Empty;
        DataTable dt = Exam.ExamTime_GetCurrExamList();
        if (dt.Rows.Count > 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                string emAllName = dr["EmAllName"].ToString();
                string emBeginTime = DateTime.Parse(dr["ApplyBeginTime"].ToString()).ToShortDateString();
                string emEndTime = DateTime.Parse(dr["ApplyEndTime"].ToString()).ToShortDateString();
                liText += 
                       @" <li>
                            <div class='admin-task-meta'>"+emBeginTime+"-"+emEndTime+@"</div>
                            <div class='admin-task-bd'>
                                <label>"+emAllName+@"</label>
                            </div>
                            <div class='am-cf'>
                                <a href='" + BSUtility.mainUrl + "BM/BM1.aspx?EmID=" + dr["EmID"].ToString() + "&EmYear=" + dr["EmYear"].ToString() + "&EmNum=" + dr["EMNum"].ToString() + @"' class='am-btn am-btn-default am-btn-xs'>报名</a>
                            </div>
                        </li>  ";                              
            }
        }
        return liText;
    }
}